package com.mapforge.plugin;

import javax.swing.ImageIcon;
import javax.swing.JPopupMenu;

import com.mapforge.gui.frames.MapEditorGUI;
import com.mapforge.io.DefaultTilemapIOHandler;
import com.mapforge.io.DefaultTilesetIOHandler;
import com.mapforge.io.IOHandlerInterface;
import com.mapforge.map.TileMap;
import com.mapforge.map.Tileset;

public class DefaultPlugin implements Plugin {
	private DefaultTilesetIOHandler tilesetIO;
	private DefaultTilemapIOHandler tilemapIO;

	public DefaultPlugin() {
		tilesetIO = new DefaultTilesetIOHandler();
		tilemapIO = new DefaultTilemapIOHandler();
	}

	public String getDescription() {
		return "The default map editor plug-in.  Handles basic formats (.tset and .tmap) and initializes"
				+ "fields in editor properly.";
	}

	public void init(MapEditorGUI gui) {
	}

	public void prepareMapPopup(JPopupMenu mapPopup) {
	}

	public void prepareTilesetPopup(JPopupMenu tilesetPopup) {
	}

	public String getAuthor() {
		return "William Morrison";
	}

	public ImageIcon getIcon() {
		return null;
	}

	public String getName() {
		return "Default Plugin";
	}

	public IOHandlerInterface<TileMap> getTilemapIOHandler() {
		return tilemapIO;
	}

	public IOHandlerInterface<Tileset> getTilesetIOHandler() {
		return tilesetIO;
	}
}